TP_HFragmenter Modifier

 

HFragment UI

thinkingParticles offers true hierarchical object decomposition tools used to easily orchestrate complex destruction effects. It is important to understand that a physically accurate and at the same time visually appealing "demolition" of complex constructs (a skyscraper, a plane, houses ...) is a complex task for the software and the artists. To use thinkingParticles to its full advantage, of being able to turn "mother nature" On or Off at will, proper "pre-demolition" briefing and planning must be performed.

Like in the real world, a demolition must be properly planned and performed - even the slightest mistake in the planning phase might turn out to be a massive disaster in the end. The same is true for thinkingParticles - an improper planning of a structural skeleton might turn out in the end to be a costly effort causing useless physics simulations over and over again.

Chaos Forced into Structure 

Hfragmenter is all about structuring complex physics into one single easy to use interface and keeping full control at all times. HFragmenter is a Hierarchical Destrcution (demolition) set of tools. It's not only one thinkingParticles node it is a set of multiple tools, all inter-linked and working together with each other.

There are 3 tools that come with thinkingParticles that are meant to work together and offer automatic direct linking between each other. The tools are:

 
 

Structural Integrity 

The purpose of the tools listed above is to help you in creating a structural skeleton that is based on freely adjustable physical parameters and hierarchical ordering of components of the object to be destroyed. This unique approach lets you freely define the breaking parts of an object, as well as when and how they will break off. Once a structural skeleton has been defined, it can be altered and adjusted to your needs at any time.

There is one main rule to follow with this tool-set the "final" object that is to be broken needs to be one mesh. It can not be individual objects, all faces or parts of the object need to be collapsed into one mesh. Find below an example to illustrate the one mesh rule.

Example:
You want to destroy a model of a complete building. Some of the components of a building may be:

 

All of the above objects can easily add up to a count of hundreds of objects or even thousands. Remember, all those objects need to end up in one single Mesh. The magic of HFragmenter comes into play when the HFragmenter Modifier is used, after the model is created, to define the "demolition groups" by simply selecting the elements in that single mesh/model and naming them accordingly. Using proper hierarchical structuring allows to easily define the order of destruction and the "chunks" that should break apart from the main mesh piece by piece



 
 

What if I do not want to setup the structure "afterwards"?

 

Collapsing thousands of objects into one mesh and then assigning each element to a specific group can be a really tiresome task.

While HFragmenter Modifier offers all the necessary tools to define a structural skeleton in no time at all - there is another tool that can help in getting complex setups much faster. The 3ds Max utility TP Collapse automatically prepares complex 3ds Max rigs to be used by HFragmenter Modifier; in fact, it automatically collapses multiple linked objects into one Mesh and assigns proper Fragmenter Groups. To learn more about the TP Collapse Utility CLICK HERE

Why one Mesh Only?

 

The main idea behind the "one mesh" solution is to enable the shape collision engine to handle huge amounts of complex objects interacting with each other. "Carving out" chunks of debris or fragments from one single mesh helps the collision engine to interact and calculate only those parts of the object relevant to the actual effect at that time. Another key advantage of the "one mesh" approach is the preservation of mass that comes for free by using the one mesh approach. Imagine a 3d model of a huge building with several stories and each level of the building has multiple rooms and assets in it like chairs, tables, doors, carpets,lamps and so on. To simulate a total collapse of such a building caused by an earth quake for example it would be a massive task for the physics engine to handle every single object on its own. It's more efficient to start breaking off the individual components as the disaster progresses through the structure.

Main Rollout Menu
 

HFragment UI

The HFragmenter Modifier behaves and works like any other modifier you know from 3ds Max, in fact the first two rollout menu options are 100% derived from the standard Mesh Select Modifier found in 3ds Max. Here, we will not describe those options and functions of those 2 Rollout menus. Mesh Select Parameters and Soft Selection are both explained in the 3ds Max reference manual and the respective knowledge is a prerequisite for the following tutorial.

What is the suggested workflow?

 

Use this modifier to define the structural skeleton of the object you want to demolish. As explained above, the "structure" needs to be presented to this modifier as one single mesh, hence the need for sub-selecting individual parts within this one mesh object.
By using all of the standard 3ds Max selection tools offered by this modifier you would start to build up the structural skeleton by grouping elements of the "parent mesh" together in so called Fragmenter Groups (or FGroups) of the object to be demolished.
If all is setup and done and a proper structure is created, the selections along with the properties can be accessed and modified in the thinkingParticles interface through the HFragmenter Operator.

Find below some simple steps of how to use this modifier.

1.) Build a "Structure" by creating FGroups with proper nesting and naming
2.) Select the FGroup name, in the list box, to assign the selection of faces to it.
3.) Select the Elements or Faces that should go into each group
4.) This automatically assigns the selected faces to be a part of the active FGroup
 

Find below a list of functions that can be invoked to handle or modify the FGroup selections. All of the advanced functionality is done through a simple right click on a FGroup level.

Right Click FGroup
 

HFragment UICreate - when clicked, a new FGroup level is created at the selected position/level.

Remove
- select this option to remove the selected FGroup along with all nested sub groups

Center of Mass
- gives access to the Center of Mass sub menu. To learn more about the functions check out the next chapter.

Clear Face Selection
- when clicked, all of the selected faces will be "un-selected" instantly

Show All
- when selected, all faces are shown

Show Not Used
- this will show all faces/objects that are not in a group and all faces in the root FGroup section.

Show Up
- check this option to see all faces "up" the hierarchy level from the currently selected level.

Show Selected
- this will show only the faces of the selected FGroup level and below.

Add Joint
- move the mouse to this option to bring up the Add Joint Sub Menu

Fragmenter
- move the mouse to this option to bring up the Fragmenter Sub Menu

Affect All Groups
- move the mouse to this option to bring up the Affect All Groups Sub Menu

 
Center Of Mass Submenu
 

HFragment UI

HFragmenter comes with several Sub-Object levels. One of this Sub-Objects is the Center of Mass (COM), this Sub-Object can be freely moved and rotated in space like any other 3D point in 3ds Max. Whenever this Sub-Object level is selected in the modifier stack, the COM becomes visible in the modeling view port, it is represented as a standard 3d-Axis icon.

The Center of Mass (COM) is one of the most important aspects to take care of when creating rigid body simulations. A misplaced or wrong COM will result in an unpredictable physics simulation because the Center of Mass is the key factor to all forces applied to an object. If the COM has an offset or it is "twisted," the forces applied to the object will not be correct and cause the object to spin in the air.

It is suggested to go through all the "Hierarchy Levels," one by one, to check for a proper COM alignment before starting complex physics simulations.


 

 
to box center - When the COM is selected for a specified hierarchy level, it is set to the bounding box center of the selection

to selected vertex
- sets the COM to the same position of a selected vertex

reset rotation
- click this option to undo any rotational modifications done to the COM axis (Sub Object)

reset translation
- click this option to undo any movements done to the COM axis (Sub Object)

Add Joint Submenu 

HFragment UI

The HFragmenter Modifier offers many different joint types to enable the "linking" between Fragment Groups. The procedure to create a link between Fragment Groups is very straight forward and easy. Right click on any Fragment Group (FGroup) and choose from the menu Add Joint, this will bring up the Joint types menu along with the possible Groups to link with. When "Joint Sub-Object Level" is selected, you will see a "in-view port" visualization of the Joint restrictions. This enables you to easily adjust the Joint constraints with instant view port feedback.

Important
thinkingParticles offers multiple ways to create Joints in TP and if that were not enough to confuse people, there are also different "kinds" of Joints as well. The PhysX collision engine, for example, has its own joint types that only work with the PhysX solver. thinkingParticles has its own joint types as well, one Helper Object type of Joint and one type implemented as thinkingParticles Nodes and both only work with the SC (Shape Collision) engine.
The last type of Joint is found in HFragmenter itself, those Modifier based Joints are another independent type of Joints automatically created within the modifier on a simple mouse click.


 

 
Spherical Joint
 

Choose this option to create a Spherical type joint between FGroups

HFragment UI
Breakable
- when checked this Joint is able to break off

Velocity
- sets the maximum velocity allowed before the Joint "breaks off"

Rotation
- sets the maximum allowed rotational speed (angle change per second) before the Joint is broken

Code
- defines a fixed code or number to break off this joint

Light
- sets an illumination threshold for breaking off this Joint

Collision
- check this option to allow for collision detection between Joint objects

Friction
- sets a friction value for this Joint

 
 
Fix Joint
 

Use this Joint option to create a Fixed type joint between FGroups

HFragment UI
Breakable
- when checked this Joint is able to break off

Velocity
- sets the maximum velocity allowed before the Joint "breaks off"

Rotation
- sets the maximum allowed rotational speed (angle change per second) before the Joint is broken

Code
- defines a fixed code or number to break off this joint

Light
- sets an illumination threshold for breaking off this Joint

Collision
- check this option to allow for collision detection between Joint objects

 
 
Spring Joint
 

Choose this Joint option to create a "Spring" type joint between FGroups

HFragment UI
Breakable
- when checked this Joint is able to break off

Velocity
- sets the maximum velocity allowed before the Joint "breaks off"

Rotation
- sets the maximum allowed rotational speed (angle change per second) before the Joint is broken

Code
- defines a fixed code or number to break off this joint

Light
- sets an illumination threshold for breaking off this Joint

Collision
- check this option to allow for collision detection between Joint objects

Spring
- defines the Spring Power, the higher this value the more power the spring will have

Spring Initial
- defines a "pre-loading" amount for the spring. Positive values will force to push the object away and negative values will pull the objects towards the Joint axis point. This value is visualized in the view port in the form of a rectangular dot, either moving up or down from the joint axis point.

Damping
- defines the dampening factor of the spring

Friction
- sets a friction value for this Joint

 
 
Cylindrical Joint
 

This menu option creates a Cylindrical type joint between FGroups

HFragment UI
Breakable
- when checked this Joint is able to break off

Velocity
- sets the maximum velocity allowed before the Joint "breaks off"

Rotation
- sets the maximum allowed rotational speed (angle change per second) before the Joint is broken

Code
- defines a fixed code or number to break off this joint

Light
- sets an illumination threshold for breaking off this Joint

Collision
- check this option to allow for collision detection between Joint objects

Friction
- sets a friction value for this Joint

 
 
Hinge Joint
 

Choose this option to create a "Hinge" type joint between FGroups

HFragment UI
Breakable
- when checked this Joint is able to break off

Velocity
- sets the maximum velocity allowed before the Joint "breaks off"

Rotation
- sets the maximum allowed rotational speed (angle change per second) before the Joint is broken

Code
- defines a fixed code or number to break off this joint

Light
- sets an illumination threshold for breaking off this Joint

Collision
- check this option to allow for collision detection between Joint objects

Angle Range
- defines the rotational constraining angle of this joint

Initial Angle
- balances the starting angle of this Joint type 0 % means the angle will only allow to bend one way

Friction
- sets a friction value for this Joint

 
 
Ball Joint 

Choose this option to create a "Ball" type joint between FGroups

HFragment UI
Breakable
- when checked this Joint is able to break off

Velocity
- sets the maximum velocity allowed before the Joint "breaks off"

Rotation
- sets the maximum allowed rotational speed (angle change per second) before the Joint is broken

Code
- defines a fixed code or number to break off this joint

Light
- sets an illumination threshold for breaking off this Joint

Collision
- check this option to allow for collision detection between Joint objects

Angle Range
- defines the rotational constraining angle of this joint

Initial Angle
- sets the starting angle of this Joint type

Friction
- sets a friction value for this Joint

 
 
Wobble Joint 

To create a "Wobble" (rubber) type joint between FGroups, choose this option

HFragment UI
Breakable
- when checked this Joint is able to break off

Velocity
- sets the maximum velocity allowed before the Joint "breaks off"

Rotation
- sets the maximum allowed rotational speed (angle change per second) before the Joint is broken

Code
- defines a fixed code or number to break off this joint

Light
- sets an illumination threshold for breaking off this Joint

Collision
- check this option to allow for collision detection between Joint objects

Wobble
- defines the "wobble" factor of this joint

Damping
- sets the dampening factor of this Joint type

 
 
Slider Joint 

Choose this option to create a "Slider" type joint between FGroups

HFragment UI
Breakable
- when checked this Joint is able to break off

Velocity
- sets the maximum velocity allowed before the Joint "breaks off"

Rotation
- sets the maximum allowed rotational speed (angle change per second) before the Joint is broken

Code
- defines a fixed code or number to break off this joint

Light
- sets an illumination threshold for breaking off this Joint

Collision
- check this option to allow for collision detection between Joint objects

Length
- defines the "length" of this joint

Initial Length
- sets the starting length (position) of this Joint type

Damping
- sets the dampening factor of this Joint type

 
 
Fragmenter Submenu

HFragment UI

In the fragmenter Sub-Menu section there are 2 "Fragmenter" options to choose from one is Volume and one is Element and as the names indicate one is creating a new mesh with increased face count and the other (Element) is using the existing topology to break off parts of the object.

It is essential to understand that Volume fragmentation is a serious task! Scale is important - all modifications initiated by this type of Fragmenter actually means a complexity increase to the power of 3 (cubic)!


 

 

Every FGroup entry in this list can get its own Fragmenter to break off parts of it, this is done by a simple right click onto the FGroup name. The Fragmenter is assigned to the selected group only - and only to this selected group!. Sub-Groups within the selected FGroup stay unaffected by the Fragmenter assigned to the Hierarchy above.

Assigning and modifying Fragmenter settings for specific FGroups is only possible by using this modifier interface. Using thinkingParticles' own node interface will not work on Fragmenter settings assigned to FGroups



 

 

 

HFragment UI

By assigning a Fragmenter to a specific FGroup, a new Fragmenter specific rollout menu will become visible whenever this FGroup is selected. The first control shown in the Fragmenter dialog is identical to both Fragmenter types (Element and Volume) it lets you define the name of the Fragmenter assigned to a FGroup.

HFragment UI

It is important to choose a proper name for the Fragmenter you intend to use on a FGroup. A proper name will make life much easier at a later state as it helps to identify the intended use of the Fragmenter.

Every Fragmenter automatically becomes instanced and it is made available to be used on other FGroups as well. The list of available "instances" is continuously extended as more and more different FRagmenters are used on FGroups.

As shown in the illustration above, the available Fragmenter instances are automatically added to the right click context menu of the FGroup list view. This makes it easy to use an instance of a Fragmenter on another FGroup.

HFragment UI

Use Helper
- check this option to use any Helper object in the scene to trigger a Fragmentation

Helper Threshold
- sets the "trigger" distance for the helper object. This world space value sets the absolute distance at which the fragmentation process should start.

Pick
- click this button to add scene object to the list of fragmentation triggers.

Rem
- click this button to remove the selected helper object from the list of fragmentation trigger helpers.

Use Lights
- when checked, illumination strength of picked light sources can be used to define the Hierarchical breaking of an object.

Lights Threshold
- defines the illumination level (brightness) that needs to be present at the point to initiate a fragmentation of the FGroup

Pick
- lets you pick any light in the scene

Rem
- removes the selected light form the list of lights

Use Map
- when checked a texture map is used to initiate the breaking off from a FGroup.

Map Threshold
- defines the breaking trigger value for the hierarchy levels by using a standard 3ds Max texture map. The trigger values are defined as: black color = 0 and white color = 1.

Spreading Size
- a radius set in world units. Using this feature will create a progressive "breaking" effect of an object. This "search" or affect radius is increased in size over time (controlled by Spreading Time) it's perfect to simulate shock waves running through a complex object hierarchy. All objects (picked for this operator) falling into this radius will be broken off , without testing any other possible trigger events (Map,Light etc)!

Spreading Time
- defines the time the radius needs to grow in size (in frames; standard 3ds Max system time).

Spreading Gradient
- lets you define the animation curve of the spreading radius, this works similarly to an ease in or ease out curve. The gradient is defined as this: the left hand side of the gradient represents radius size 0 the right hand side represents size 100%. A Spreading Time value of 30 frames will look "into" this gradient 30 times (30 samples). This method of control offers full control over the radius size animation. A black color will create a radius of 0 while a white color in the gradient will create a size of 100%.


HFragment UI

The default fracturing method used by volumeBreaker is based on a Voronoi tessellation, with Raster you control the size and spacing of the cell tessellation.

Raster
- the raster size defines the minimum spacing between cells and therefore controls the size of the cells created. Be warned that smaller raster sizes will produce a LOT of geometry and could take some time to calculate. This value is measured as a percentage of the bounding box size with 100% being as big as the bounding box of the object.


image image image
Raster: 150mm Raster: 250mm Raster: 400mm
Density: 1500 Density: 1500 Density: 1500
 
Note that the leftmost image has had the number of cells created limited by the Max Chunks option (see below).
 
 

Density - controls how many cells are placed relative to the centers defined by the raster size. This alters both the size and the distribution of the cells created.


image image image
Raster: 250mm Raster: 250mm Raster: 250mm
Density: 300 Density: 750 Density: 2000
 
 

Seed - sets the random seed used to generate the initial cell distribution.

Material
- This sets the material ID number of all the interior faces that are created by volumeBreaker. All external faces maintain their current material IDs and UVW mapping co-ordinates.

Max Chunks
- This defines the maximum number of cells that will be created by volumeBreaker. This is useful to avoid long calculation times when creating particularly dense geometry. The number of cells actually created by volumeBreaker is shown below this control to assist you in optimizing your final result.

ZSnap
- defines the maximum distance to the cutting plane, beyond which a new vertex is not created. This feature is used to avoid vertices being too close together, think of it as a minimum distance between vertices on the same 'chunk' in the volumeBreaker solution. Use this function to avoid generating a huge amount of thin ultra small triangles which can cause render errors.

WARNING: Very high values for the ZSnap offset can result in meshes that interpenetrate, these will be illegal for any rigid body simulation that attempts to use such meshes.

Weld Distance - defines the di

 

 

 

Distance to be used to weld two or more Vertices into one, measured as a percentage of the elements bounding box.

Scale X,Y,Z
- defines for each single axis a scaling/stretching factor for the volume raster

image image
image image
ZSnap: 0mm ZSnap: 100mm
 

These sample images show an exaggerated Adjust Plane effect so that you can understand what this function does, you certainly don't want to use values this high in your actual scenes.

Activation 

HFragment UI

Use Helper
- check this option to use any Helper object in the scene to trigger a Fragmentation

Helper Threshold
- sets the "trigger" distance for the helper object. This world space value sets the absolute distance at which the fragmentation process should start.

Pick
- click this button to add scene object to the list of fragmentation triggers.

Rem
- click this button to remove the selected helper object from the list of fragmentation trigger helpers.

Use Lights
- when checked, illumination strength of picked light sources can be used to define the Hierarchical breaking of an object.

Lights Threshold
- defines the illumination level (brightness) that needs to be present at the point to initiate a fragmentation of the FGroup

Pick
- lets you pick any light in the scene

Rem
- removes the selected light form the list of lights

Use Map
- when checked a texture map is used to initiate the breaking off from a FGroup.

Map Threshold
- defines the breaking trigger value for the hierarchy levels by using a standard 3ds Max texture map. The trigger values are defined as: black color = 0 and white color = 1.

Spreading Size
- a radius set in world units. Using this feature will create a progressive "breaking" effect of an object. This "search" or affect radius is increased in size over time (controlled by Spreading Time) it's perfect to simulate shock waves running through a complex object hierarchy. All objects (picked for this operator) falling into this radius will be broken off , without testing any other possible trigger events (Map,Light etc)!

Spreading Time
- defines the time the radius needs to grow in size (in frames; standard 3ds Max system time).

Spreading Gradient
- lets you define the animation curve of the spreading radius, this works similarly to an ease in or ease out curve. The gradient is defined as this: the left hand side of the gradient represents radius size 0 the right hand side represents size 100%. A Spreading Time value of 30 frames will look "into" this gradient 30 times (30 samples). This method of control offers full control over the radius size animation. A black color will create a radius of 0 while a white color in the gradient will create a size of 100%.

Affect All Groups Submenu

HFragment UI

As the name indicates "Affect All Groups" will affect all Fragment Groups (FGroups) in one go - regardless of their Hierarchy level.

center of mass to box center
- choose this option to reset all center of mass points to the bounding box centers of every FGroup in the Hierarchy.

create groups from elements
- choose this option to put every element, of an object, automatically into its own FGroup. Be careful, objects with thousands of elements will create thousands of FGroups in the tree view.

Initialize Activation Code
- choose this option to automatically count up the Code values. Starting with 0 every code value in FGroups will be increased by one automatically (top to down)

reset face selection
- choose this option to remove all selected faces from all hierarchies